Integrand size = 21, antiderivative size = 115 \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=b^4 x+\frac {2 a b \left (a^2+2 b^2\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \left (2 a^2+17 b^2\right ) \tan (c+d x)}{3 d}+\frac {4 a^3 b \sec (c+d x) \tan (c+d x)}{3 d}+\frac {a^2 (a+b \cos (c+d x))^2 \sec ^2(c+d x) \tan (c+d x)}{3 d} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2871, 3110, 3100, 2814, 3855} \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\frac {4 a^3 b \tan (c+d x) \sec (c+d x)}{3 d}+\frac {2 a b \left (a^2+2 b^2\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \left (2 a^2+17 b^2\right ) \tan (c+d x)}{3 d}+\frac {a^2 \tan (c+d x) \sec ^2(c+d x) (a+b \cos (c+d x))^2}{3 d}+b^4 x \]
[In]
[Out]
Rule 2814
Rule 2871
Rule 3100
Rule 3110
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {a^2 (a+b \cos (c+d x))^2 \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {1}{3} \int (a+b \cos (c+d x)) \left (8 a^2 b+a \left (2 a^2+9 b^2\right ) \cos (c+d x)+3 b^3 \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx \\ & = \frac {4 a^3 b \sec (c+d x) \tan (c+d x)}{3 d}+\frac {a^2 (a+b \cos (c+d x))^2 \sec ^2(c+d x) \tan (c+d x)}{3 d}-\frac {1}{6} \int \left (-2 a^2 \left (2 a^2+17 b^2\right )-12 a b \left (a^2+2 b^2\right ) \cos (c+d x)-6 b^4 \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx \\ & = \frac {a^2 \left (2 a^2+17 b^2\right ) \tan (c+d x)}{3 d}+\frac {4 a^3 b \sec (c+d x) \tan (c+d x)}{3 d}+\frac {a^2 (a+b \cos (c+d x))^2 \sec ^2(c+d x) \tan (c+d x)}{3 d}-\frac {1}{6} \int \left (-12 a b \left (a^2+2 b^2\right )-6 b^4 \cos (c+d x)\right ) \sec (c+d x) \, dx \\ & = b^4 x+\frac {a^2 \left (2 a^2+17 b^2\right ) \tan (c+d x)}{3 d}+\frac {4 a^3 b \sec (c+d x) \tan (c+d x)}{3 d}+\frac {a^2 (a+b \cos (c+d x))^2 \sec ^2(c+d x) \tan (c+d x)}{3 d}+\left (2 a b \left (a^2+2 b^2\right )\right ) \int \sec (c+d x) \, dx \\ & = b^4 x+\frac {2 a b \left (a^2+2 b^2\right ) \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \left (2 a^2+17 b^2\right ) \tan (c+d x)}{3 d}+\frac {4 a^3 b \sec (c+d x) \tan (c+d x)}{3 d}+\frac {a^2 (a+b \cos (c+d x))^2 \sec ^2(c+d x) \tan (c+d x)}{3 d} \\ \end{align*}
Time = 0.23 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.67 \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\frac {3 b^4 d x+6 a b \left (a^2+2 b^2\right ) \text {arctanh}(\sin (c+d x))+3 a^2 \left (a^2+6 b^2+2 a b \sec (c+d x)\right ) \tan (c+d x)+a^4 \tan ^3(c+d x)}{3 d} \]
[In]
[Out]
Time = 4.25 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.95
method | result | size |
derivativedivides | \(\frac {-a^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+4 a^{3} b \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+6 a^{2} b^{2} \tan \left (d x +c \right )+4 a \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b^{4} \left (d x +c \right )}{d}\) | \(109\) |
default | \(\frac {-a^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+4 a^{3} b \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+6 a^{2} b^{2} \tan \left (d x +c \right )+4 a \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b^{4} \left (d x +c \right )}{d}\) | \(109\) |
parts | \(-\frac {a^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {b^{4} \left (d x +c \right )}{d}+\frac {2 a^{3} b \sec \left (d x +c \right ) \tan \left (d x +c \right )}{d}+\frac {2 a^{3} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {6 a^{2} b^{2} \tan \left (d x +c \right )}{d}+\frac {4 a \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(124\) |
risch | \(b^{4} x -\frac {4 i a^{2} \left (3 a b \,{\mathrm e}^{5 i \left (d x +c \right )}-9 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-3 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-18 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-3 a b \,{\mathrm e}^{i \left (d x +c \right )}-a^{2}-9 b^{2}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {2 a^{3} b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {2 a^{3} b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(196\) |
parallelrisch | \(\frac {-18 b \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (a^{2}+2 b^{2}\right ) a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+18 b \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (a^{2}+2 b^{2}\right ) a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+3 b^{4} d x \cos \left (3 d x +3 c \right )+2 \left (a^{4}+9 a^{2} b^{2}\right ) \sin \left (3 d x +3 c \right )+12 \sin \left (2 d x +2 c \right ) a^{3} b +9 b^{4} d x \cos \left (d x +c \right )+6 a^{2} \sin \left (d x +c \right ) \left (a^{2}+3 b^{2}\right )}{3 d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(200\) |
norman | \(\frac {b^{4} x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b^{4} x \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b^{4} x -b^{4} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 b^{4} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 b^{4} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 b^{4} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 b^{4} x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8 a^{2} \left (a^{2}-6 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \left (a^{2}-2 a b +6 b^{2}\right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \left (a^{2}+2 a b +6 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {4 a^{2} \left (5 a^{2}-12 a b +18 b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {4 a^{2} \left (5 a^{2}+12 a b +18 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a^{2} \left (13 a^{2}-30 a b -18 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a^{2} \left (13 a^{2}+30 a b -18 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {2 a b \left (a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a b \left (a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(439\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.20 \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\frac {3 \, b^{4} d x \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (6 \, a^{3} b \cos \left (d x + c\right ) + a^{4} + 2 \, {\left (a^{4} + 9 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{3}} \]
[In]
[Out]
\[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\int \left (a + b \cos {\left (c + d x \right )}\right )^{4} \sec ^{4}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.09 \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{4} + 3 \, {\left (d x + c\right )} b^{4} - 3 \, a^{3} b {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, a b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 18 \, a^{2} b^{2} \tan \left (d x + c\right )}{3 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 221 vs. \(2 (109) = 218\).
Time = 0.34 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.92 \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\frac {3 \, {\left (d x + c\right )} b^{4} + 6 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{3 \, d} \]
[In]
[Out]
Time = 14.88 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.61 \[ \int (a+b \cos (c+d x))^4 \sec ^4(c+d x) \, dx=\frac {2\,b^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,a^4\,\sin \left (c+d\,x\right )}{3\,d\,\cos \left (c+d\,x\right )}+\frac {a^4\,\sin \left (c+d\,x\right )}{3\,d\,{\cos \left (c+d\,x\right )}^3}+\frac {8\,a\,b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,a^3\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,a^3\,b\,\sin \left (c+d\,x\right )}{d\,{\cos \left (c+d\,x\right )}^2}+\frac {6\,a^2\,b^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )} \]
[In]
[Out]